<?php
/*
Template Name: Custom Archives
*/
	get_header(); 
	
	$sidebar =    "right-sidebar";
	if($sidebar!="full") :
	
	$hasSidebar = ($sidebar == "right-sidebar") ?	"hasRightSidebar" : "hasLeftSidebar";
	$layout = 'two-third-width'; 
else :
	$layout = 'full-width';
endif;
	
	?>   




<div class="skeleton clearfix page blog <?php echo $hasSidebar; ?>">
      
      <div class="content clearfix ">
             
            <div class="<?php if($sidebar!="full") echo "two-third-width"; else echo "full-width"; ?> archive">
             
            <h1 class="custom-font heading"> <?php _e('Archives','h-framework'); ?></h1>  
                  
              <h2 class="custom-font"><?php _e('25 Latest Posts','h-framework'); ?></h2>         
           <div class="post-list clearfix">
            <ul class="clearfix">
             <?php 
			  $i=0;
			  $query = new WP_Query();
			  $query->query('cat='.$catid.'&posts_per_page=25');
			  while ($query->have_posts()) : $query->the_post();?>
             
                 <?php 
				
				 echo "<li class=' clearfix'>";
				 echo " <a href=\"".get_permalink()."\">". $helper->getShortenContent(60,strip_shortcodes( get_the_title() )) ."  </a>";
				 echo "</li>";
				 
				?>
              
			<?php $i++; endwhile; ?>
            </ul>
           
           </div>
           
            
        
                 <h2 class="custom-font"><?php _e('Categories','h-framework'); ?></h2>
                  <ul>
                  <?php
                  // Add categories you'd like to exclude in the exclude here
                  $cats = get_categories('exclude=');
                  foreach ($cats as $cat) {
                    echo "<li><a href='".get_category_link($cat->ID)."'>".$cat->cat_name."</a>";
                    echo "</li>";
                  }
                  ?>
                  </ul>
                
                 <h2 class="custom-font">Monthly Archives</h2>
                  <ul>
                 <?php wp_get_archives('type=monthly&limit=12'); ?>
                  </ul>
                
                
            </div>
          
            
            
              <?php  
	  wp_reset_query();
	  if($sidebar!="full") 
	  get_sidebar();  
	 ?>     
               
       </div> 
                  
 </div>
    
<?php get_footer(); ?>
      